
package POJOs;

import java.sql.Timestamp;
import java.util.Observable;
import org.hibernate.Session;

/**
 *
 * @author fabiofurlan
 */
public class SSessionAllocation extends SCRUDidOnly {
    
    public Session session;
    //When this object is allocated to someone bool = true
    public boolean bool;
    //This index is used to deallocate the object
    public int index;
    //
    public Timestamp lastAccess;

    public Timestamp getLastAccess() {
        return lastAccess;
    }

    public void setLastAccess(Timestamp lastAccess) {
        this.lastAccess = lastAccess;
    }
    
    public boolean isBool() {
        return bool;
    }

    public void setBool(boolean bool) {
        this.bool = bool;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public Session getSession() {
        return session;
    }

    public void setSession(Session session) {
        this.session = session;
    }
    
    public SSessionAllocation(Session par, int aux){
        session=par;
        bool=false;
        index=aux;
    }

    //notify the session deallocation
    public void deallocateNotify(){
        this.notifyObservers();
    }

}
